<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="${initParam.url }/statics/css/detail.css" rel="stylesheet">
<script type="text/javascript">
	function fk() {
		var d = $("#text").val();
		var comid = $("#comid").val();
		if(d!=null && d!=""){
		
			window.location.href='${initParam.url}/dispose?comid='+comid+'&content='+d;
		}
		else{
			$("#error").html("请输入回复内容！");
		}
	}
	
</script>
</head>
<body>
	<div style="width: 1090px;height: 640px;background-color: #FFF;margin: 20px;">
		<h4
			style="background-color: #9FB2C2; padding-left: 10px; color: #516D8A; line-height: 40px;">
			<img alt="" src="${initParam.url}/statics/images/title.jpg">
			详情
		</h4>
		
		<div class="sp">
			<span class="sp-1">请填写回复信息：</span>
			<input type="hidden" name="comid" id="comid"  value="${detail.id}">
			<br/>
			<table>
				<tr>
					<td>业主姓名：</td>
					<td>${detail.owner.name }</td>
				</tr>
				<tr>
					<td>业主地址：</td>
					<td>${detail.community.communityName} &nbsp;${detail.owner.houseIN} &nbsp;${detail.owner.tower }</td>
				</tr>
				<tr>
					<td>报修内容：</td>
					<td>${detail.content }</td>
				</tr>
				
			</table>
			
			<div class="sp-2">
				<c:if test="${detail.repairsImage==null }">
				<a href="${initParam.url}/statics/images/暂无图片.jpg">
				<img style="width: 300px;height:200px; " onerror="this.src='${initParam.url}/statics/images/暂无图片.jpg'" src="${initParam.url}/statics${detail.repairsImage}">
				</a>
				</c:if>
				<c:if test="${detail.repairsImage!=null }">
					<a href="${initParam.url}/statics${detail.repairsImage}">
				<img style="width: 300px;height:200px; " onerror="this.src='${initParam.url}/statics/images/暂无图片.jpg'" src="${initParam.url}/statics${detail.repairsImage}">
				</a>
				</c:if>
			</div>
			
			<div class="sp-3">
				<p>回复内容：</p>
				
				<textarea id="text" style="width: 1060px;height: 180px;"></textarea>
				<button type="button" onclick="fk()">回复</button>
				<button type="button" onclick="javascript:history.back(-1);">返回</button><span style="color:red;" id="error"></span>
			</div>
		</div>
	</div>
</body>
</html>